﻿#pragma once
#include "DSP.h"

namespace yzrilyzr_dsp{
	ECLASS(UnitDelay, public DSP){
	public:
	u_sample value=0;
	u_sample procDsp(u_sample in)override{
		u_sample out=value;
		value=in;
		return out;
	}
	void init(u_sample_rate sampleRate)override{
		value=0;
	}
	void resetMemory()override{
		value=0;
	}
	void cloneParam(DSP * obj1)override{}
	std::shared_ptr<DSP> cloneDSP()override{
		return std::make_shared < UnitDelay>();
	}
	yzrilyzr_lang::String toString()const override;
	};
}